<template>
  <van-tabbar
    v-model="active"
    v-if="$route.path != '/reg' && $route.path != '/login'"
  >
    <van-tabbar-item
      v-for="(item, index) in navList"
      :key="item.id"
      :icon="item.icon"
      :to="item.path"
      >{{ item.title }}</van-tabbar-item
    >
  </van-tabbar>
</template>

<script>
export default {
  data() {
    return {
      navList: [
        {
          id: 1,
          title: "首页",
          path: "/home",
          icon: "home-o"
        },
        {
          id: 2,
          title: "团拼",
          path: "/group",
          icon: "search"
        },
        {
          id: 3,
          title: "分类",
          path: "/list",
          icon: "home-o"
        },
        {
          id: 4,
          title: "购物车",
          path: "/cart",
          icon: "home-o"
        },
        {
          id: 5,
          title: "我的",
          path: "/mine",
          icon: "home-o"
        }
      ],
      //高亮
      active: 0
    };
  },

  created() {
    console.log(this, "6666");
  }
};
</script>

